package com.bzg.autowire.qualifier;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;
import java.util.List;

@ComponentScan
@Configuration
public class Config {

	@Bean
	@Qualifier("orderService1")  // 也能被注入
	public OrderService orderService() {
		return new OrderService();
	}

	@Bean
	@Qualifier("orderService")
	public OrderService orderService1() {
		return new OrderService();
	}

}
